# This code is part of the MWP System
# Copyright (c) 2012 Benjamin Lubin (blubin@bu.com) 
# Published under and subject to the GPLv2 license available at http://www.gnu.org/licenses/gpl-2.0.html

'''
Created on Dec 14, 2012
@author: TEam DeathStar
'''

from frontend.roleApplication import RoleApplication;
from frontend.form import Type;
from unique import UNIQUE;

class ClientHandlerApplication(RoleApplication):
    """ The Client Information Interface """

    def __init__(self):
        super(ClientHandlerApplication, self).__init__("construction"+UNIQUE, "ClientHandler");
        self.register_source_step("ProjectRequest", self.customer_input_form_creator);

    def customer_input_form_creator(self, stepname, form):
        form.add_html_label('<B>Enter new customer input information:</B>')
        form.add_field(Type.SHORTSTRING, "FirstName", labeltext="First Name", initial="First");
        form.add_field(Type.SHORTSTRING, "LastName", labeltext="Last Name", initial="Last");
        form.add_field(Type.SHORTSTRING, "StreetAddress", labeltext="Street Address", initial="Street Address");
        form.add_static_label("Project Information:");
        form.add_field(Type.FLOAT, "SqFt", labeltext="Square Feet")
        form.add_field(Type.CHOICE, "BuildingType", labeltext="Building Type", choices=['Retail', 'Office', 'Industrial'], initial='Retail');
        form.add_field(Type.CURRENCY, "Budget", labeltext="Budget")
        form.add_field(Type.LONGSTRING, "Notes", labeltext="Notes")
    
if __name__ == '__main__':
    app = ClientHandlerApplication();
    app.MainLoop();